package cn.jeeweb.web.modules.sys.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;

import java.util.List;

/**
 * 包类
 */
public class UiProperty implements java.io.Serializable{
    @TableId(value = "id", type = IdType.UUID)
    private String id;
    @TableField(value = "localKey")
    private String localKey;//本地化文件关键字
    @TableField(value = "propertyName")
    private String propertyName;//属性的名称
    @TableField(value = "aliasName")
    private String aliasName;//字段别字，用于页面控件标识
    @TableField(value = "labelText")
    private String labelText;//控件显示的标题
    @TableField(value = "module_Id")
    private String moduleId;//所属模块ID
    @TableField(value = "ownerPropertyName")
    private String ownerPropertyName;//上级属性名称
    @TableField(value = "isReference")
    private int isReference;//是否属于引用类型
    @TableField(value = "referenceModule_Id")
    private String referenceModuleId;//引用对象的模块ID
    @TableField(value = "displayPosition")
    private int displayPosition;//显示位置，值越小位置越靠前
    @TableField(value = "package_Id")
    private String packageId;//所属页面元素包ID
    @TableField(value = "canDisplay")
    private int canDisplay;//是否可显示
    @TableField(value = "isDisplayAsSearchResult")
    private int isDisplayAsSearchResult;//在查询结果界面是否显示
    @TableField(value = "canSearch")
    private int canSearch;//是否能用于查询
    @TableField(value = "canBeNull")
    private int canBeNull;//是否可为空值
    @TableField(value = "isReadOnly")
    private int isReadOnly;//是否只读
    @TableField(value = "isSupportNewEdit")
    private int isSupportNewEdit;//是否允许修改（针对只读的字段，新建时可编辑。）
    @TableField(value = "isSupportModify")
    private int isSupportModify;//是否允许变更
    @TableField(value = "controlType")
    private int controlType;//显示控件类型：0简单的静态控件 1数据字典下拉选择控件 2枚举下拉框 3业务对象状态下拉框 4客户自定义字典下拉框 5无数据源的下拉框
    @TableField(value = "staticControl")
    private int staticControl;//固定类型的控件类型：0字符串文本框 1整数文本框 2实数文本框 3日期选择控件 4正实数文本框 5电子邮件文本框 6网址文本框 7正整数文本框 8计算文本框 9单选框 10复选框 11多行文本框 15引用文本框 38图片上传及预览控件 1001特殊控件:带时分秒的日期选择控件
    @TableField(value = "dataType")
    private int dataType;//数据类型:0一般字符 1单价类 2总金额类 3数量 4百分比 5与金额相关的数据
    @TableField(value = "dataSize")
    private int dataSize;//字符或者数字的最大长度
    @TableField(value = "dataPrecision")
    private int dataPrecision;//精度
    @TableField(value = "hasRule")
    private int hasRule;//是否有应用规则
    @TableField(value = "controlRule")
    private String controlRule;//应用规则的Code：多个以|连接
    @TableField(value = "withLabel")
    private int withLabel;//是否需要显示标签
    @TableField(value = "isSingleRow")
    private int isSingleRow;//控件是否独占一行
    @TableField(value = "width")
    private String width;//控件宽度,24列布局单位
    @TableField(value = "columnWidth")
    private String columnWidth;//列表里的列宽度，PX
    @TableField(value = "canPrint")
    private int canPrint;//能否打印
    @TableField(value = "canExport")
    private int canExport;//能否导出
    @TableField(value = "dictCode")
    private String dictCode; //数据字典组Code，当controlType为1时，必填

    @TableField(exist = false)
    public List<Dict> dictItems;
    @TableField(exist = false)
    public List<UiControlRule> controlRules;
    @TableField(exist = false)
    public List<UiProperty> childUiProperty;
    @TableField(exist = false)
    public List<UiProperty> referenceUiProperty;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLocalKey() {
        return localKey;
    }

    public void setLocalKey(String localKey) {
        this.localKey = localKey;
    }

    public String getPropertyName() {
        return propertyName;
    }

    public void setPropertyName(String propertyName) {
        this.propertyName = propertyName;
    }

    public String getAliasName() {
        return aliasName;
    }

    public void setAliasName(String aliasName) {
        this.aliasName = aliasName;
    }

    public String getLabelText() {
        return labelText;
    }

    public void setLabelText(String labelText) {
        this.labelText = labelText;
    }

    public String getModuleId() {
        return moduleId;
    }

    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }

    public String getOwnerPropertyName() {
        return ownerPropertyName;
    }

    public void setOwnerPropertyName(String ownerPropertyName) {
        this.ownerPropertyName = ownerPropertyName;
    }

    public int getIsReference() {
        return isReference;
    }

    public void setIsReference(int isReference) {
        this.isReference = isReference;
    }

    public String getReferenceModuleId() {
        return referenceModuleId;
    }

    public void setReferenceModuleId(String referenceModuleId) {
        this.referenceModuleId = referenceModuleId;
    }

    public int getDisplayPosition() {
        return displayPosition;
    }

    public void setDisplayPosition(int displayPosition) {
        this.displayPosition = displayPosition;
    }

    public String getPackageId() {
        return packageId;
    }

    public void setPackageId(String packageId) {
        this.packageId = packageId;
    }

    public int getCanDisplay() {
        return canDisplay;
    }

    public void setCanDisplay(int canDisplay) {
        this.canDisplay = canDisplay;
    }

    public int getIsDisplayAsSearchResult() {
        return isDisplayAsSearchResult;
    }

    public void setIsDisplayAsSearchResult(int isDisplayAsSearchResult) {
        this.isDisplayAsSearchResult = isDisplayAsSearchResult;
    }

    public int getCanSearch() {
        return canSearch;
    }

    public void setCanSearch(int canSearch) {
        this.canSearch = canSearch;
    }

    public int getCanBeNull() {
        return canBeNull;
    }

    public void setCanBeNull(int canBeNull) {
        this.canBeNull = canBeNull;
    }

    public int getIsReadOnly() {
        return isReadOnly;
    }

    public void setIsReadOnly(int isReadOnly) {
        this.isReadOnly = isReadOnly;
    }

    public int getIsSupportNewEdit() {
        return isSupportNewEdit;
    }

    public void setIsSupportNewEdit(int isSupportNewEdit) {
        this.isSupportNewEdit = isSupportNewEdit;
    }

    public int getIsSupportModify() {
        return isSupportModify;
    }

    public void setIsSupportModify(int isSupportModify) {
        this.isSupportModify = isSupportModify;
    }

    public int getControlType() {
        return controlType;
    }

    public void setControlType(int controlType) {
        this.controlType = controlType;
    }

    public int getStaticControl() {
        return staticControl;
    }

    public void setStaticControl(int staticControl) {
        this.staticControl = staticControl;
    }

    public int getDataType() {
        return dataType;
    }

    public void setDataType(int dataType) {
        this.dataType = dataType;
    }

    public int getDataSize() {
        return dataSize;
    }

    public void setDataSize(int dataSize) {
        this.dataSize = dataSize;
    }

    public int getDataPrecision() {
        return dataPrecision;
    }

    public void setDataPrecision(int dataPrecision) {
        this.dataPrecision = dataPrecision;
    }

    public int getHasRule() {
        return hasRule;
    }

    public void setHasRule(int hasRule) {
        this.hasRule = hasRule;
    }

    public String getControlRule() {
        return controlRule;
    }

    public void setControlRule(String controlRule) {
        this.controlRule = controlRule;
    }

    public int getWithLabel() {
        return withLabel;
    }

    public void setWithLabel(int withLabel) {
        this.withLabel = withLabel;
    }

    public int getIsSingleRow() {
        return isSingleRow;
    }

    public void setIsSingleRow(int isSingleRow) {
        this.isSingleRow = isSingleRow;
    }

    public String getWidth() {
        return width;
    }

    public void setWidth(String width) {
        this.width = width;
    }

    public int getCanPrint() {
        return canPrint;
    }

    public void setCanPrint(int canPrint) {
        this.canPrint = canPrint;
    }

    public int getCanExport() {
        return canExport;
    }

    public void setCanExport(int canExport) {
        this.canExport = canExport;
    }

    @JSONField(serialize=false)
    public List<Dict> getDictItems() {
        return dictItems;
    }

    public void setDictItems(List<Dict> dictItems) {
        this.dictItems = dictItems;
    }

    public String getDictCode() {
        return dictCode;
    }

    public void setDictCode(String dictCode) {
        this.dictCode = dictCode;
    }

    public List<UiControlRule> getControlRules() {
        return controlRules;
    }

    public void setControlRules(List<UiControlRule> controlRules) {
        this.controlRules = controlRules;
    }

    public List<UiProperty> getChildUiProperty() {
        return childUiProperty;
    }

    public void setChildUiProperty(List<UiProperty> childUiProperty) {
        this.childUiProperty = childUiProperty;
    }

    public List<UiProperty> getReferenceUiProperty() {
        return referenceUiProperty;
    }

    public void setReferenceUiProperty(List<UiProperty> referenceUiProperty) {
        this.referenceUiProperty = referenceUiProperty;
    }
}
